<script setup>
defineProps(["list"]);

const getZhType = (type) => {
  switch (type) {
    case "top":
      return "置顶";
    case "inform":
      return "通知";
    case "meeting":
      return "会议";
    case "activity":
      return "活动";
    default:
      return "";
  }
};
</script>

<template>
  <uv-cell-group>
    <uv-cell
      v-for="(it, index) in list"
      icon="bell-fill"
    >
      <template #title>
        <view class="w-auto">
          <uv-text
            :lines="1"
            :text="`${index + 1}. 【${getZhType(it.type)}】 ${it.newsTitle}`"
          ></uv-text>
        </view>
      </template>
    </uv-cell>
  </uv-cell-group>
</template>

<style lang="scss" scoped></style>
